<!DOCTYPE html><html lang="zh-CN"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1"><meta http-equiv="X-UA-Compatible" content="ie=edge"><meta name="theme-color" content="#fff" id="theme-color"><meta name="description" content="一个爱分享，爱学习，偶尔发布一些小作品的是非地"><link rel="icon" href="https://gcore.jsdelivr.net/gh/abbw/CDN/img/favicon.ico"><title>一个别有风格的自杀插件</title><meta property="og:title" content="一个别有风格的自杀插件"><meta property="og:url" content="https://qzkyl.ml/posts/35186.html"><meta property="og:img" content="https://gcore.jsdelivr.net/gh/abbw/CDN/img/avatar.jpg"><meta property="og:img" content="一个爱分享，爱学习，偶尔发布一些小作品的是非地"><meta property="og:type" content="article"><meta property="og:article:published_time" content="2018-10-24"><meta property="og:article:modified_time" content="2018-10-24"><meta property="og:article:author" content="笨蛋海绵"><meta property="og:article:tag" content="sp源码"><link rel="preload" href="//at.alicdn.com/t/font_1946621_i1kgafibvw.css" as="style"><link rel="preload" href="//at.alicdn.com/t/font_2605492_lp1g2dirp3.css" as="style"><link rel="preload" href="/css/main.css" as="style"><link rel="preload" href="//unpkg.com/@waline/client@v2/dist/waline.css" as="style"><link rel="preload" href="//unpkg.com/@waline/client@v2/dist/waline.js" as="script"><link rel="modulepreload" href="//instant.page/5.1.0"><link rel="stylesheet" href="/css/main.css"><link rel="stylesheet" href="//at.alicdn.com/t/font_1946621_i1kgafibvw.css"><link rel="stylesheet" href="//at.alicdn.com/t/font_2605492_lp1g2dirp3.css"><link rel="stylesheet" href="//unpkg.com/@waline/client@v2/dist/waline.css"><link rel="manifest" href="/manifest.json"><meta name="msapplication-TileColor" content="#fff"><link rel="apple-touch-icon" sizes="180x180" href="/img/pwa/apple-touch-icon.png"><link rel="icon" type="image/png" sizes="32x32" href="/img/pwa/32.png"><link rel="icon" type="image/png" sizes="16x16" href="/img/pwa/16.png"><link rel="mask-icon" href="/img/pwa/safari-pinned-tab.svg" color="#5bbad5"><script>function loadScript(e,t){var n=document.createElement("script");n.src=e,t&&(n.onload=t),n.async=!0,document.body.appendChild(n)}function loadCSS(e,t,n){var a=document.createElement("link");a.ref="stylesheet",a.href=e,a.dataset[t]=n,document.head.appendChild(a)}function changeCSS(e,t,n){var a=document.querySelector(t),c=document.createElement("link");c.setAttribute("rel","stylesheet"),c.setAttribute("href",e),c.dataset.prism=n,document.head.replaceChild(c,a)}</script><script>var reverseDarkList={dark:"light",light:"dark"},themeColor={dark:"#1c1c1e",light:"#fff"},getCssMediaQuery=function(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"},reverseDarkModeSetting=function(){var e=localStorage.getItem("user-color-scheme");if(reverseDarkList[e])e=reverseDarkList[e];else{if(null!==e)return;e=reverseDarkList[getCssMediaQuery()]}return localStorage.setItem("user-color-scheme",e),e}</script><script>var setDarkmode=function(e){var t=e||localStorage.getItem("user-color-scheme");t===getCssMediaQuery()?(document.documentElement.removeAttribute("data-user-color-scheme"),localStorage.removeItem("user-color-scheme"),document.getElementById("theme-color").content=themeColor[t],document.getElementById("theme-color").dataset.mode=t):reverseDarkList[t]?(document.documentElement.setAttribute("data-user-color-scheme",t),document.getElementById("theme-color").content=themeColor[t],document.getElementById("theme-color").dataset.mode=t):(document.documentElement.removeAttribute("data-user-color-scheme"),localStorage.removeItem("user-color-scheme"),document.getElementById("theme-color").content=themeColor[getCssMediaQuery()],document.getElementById("theme-color").dataset.mode=getCssMediaQuery())};setDarkmode()</script><link rel="preload" href="//gcore.jsdelivr.net/npm/@fancyapps/fancybox@latest/dist/jquery.fancybox.min.js" as="script"><link rel="preload" href="//gcore.jsdelivr.net/npm/@fancyapps/fancybox@latest/dist/jquery.fancybox.min.css" as="style"><link rel="preload" href="/js/lib/lozad.min.js" as="script"><link rel="prefetch" href="//unpkg.com/@waline/client@v2/dist/waline.js" as="script"><meta name="generator" content="Hexo 6.3.0"><link rel="alternate" href="/atom.xml" title="骑猪看月亮" type="application/atom+xml"></head><body><div class="wrapper"><nav class="navbar"><div class="navbar-logo"><a class="navbar-logo-main" href="/"><img class="navbar-logo-img" width="32" height="32" src="https://gcore.jsdelivr.net/gh/abbw/CDN/img/favicon.ico" alt="blog logo"> <span class="navbar-logo-dsc">骑猪看月亮</span></a></div><div class="navbar-menu"><a href="/" class="navbar-menu-item">首页</a> <a href="/archives" class="navbar-menu-item">归档</a> <a href="/tags" class="navbar-menu-item">标签</a> <a href="/categories" class="navbar-menu-item">分类</a> <a href="/shuoshuo" class="navbar-menu-item">说说</a> <a href="/links" class="navbar-menu-item">友链</a><div class="navbar-menu-right"><button class="navbar-menu-item darknavbar navbar-menu-btn" aria-label="Toggle dark mode" id="dark"><i class="iconfont icon-yejian"></i></button> <button class="navbar-menu-item searchnavbar navbar-menu-btn" aria-label="Toggle search" id="search"><i class="iconfont icon-search"></i></button></div></div></nav><div id="local-search" style="display:none"><input class="navbar-menu-item" id="search-input" placeholder="请输入搜索内容..."><div id="search-content"></div></div><div class="section-wrap"><div class="container"><div class="columns"><aside class="left-column"><div class="card card-author"><img src="https://gcore.jsdelivr.net/gh/abbw/CDN/img/avatar.jpg" class="author-img" width="88" height="88" alt="author avatar"><p class="author-name">笨蛋海绵</p><p class="author-description">一个爱分享，爱学习，偶尔发布一些小作品的是非地</p><div class="author-message"><a class="author-posts-count" href="/archives"><span>98</span> <span>文章</span></a> <a class="author-categories-count" href="/categories"><span>7</span> <span>分类</span></a> <a class="author-tags-count" href="/tags"><span>29</span> <span>标签</span></a></div><div class="author-card-society"><div class="author-card-society-icon"><a target="_blank" rel="noopener" href="https://github.com/abbw"><i class="iconfont icon-GitHub society-icon"></i></a></div><div class="author-card-society-icon"><a target="_blank" rel="noopener" href="https://gitee.com/abbw"><i class="iconfont icon-gitee-fill-round society-icon"></i></a></div><div class="author-card-society-icon"><a href="/steamgames"><i class="iconfont icon-steam society-icon"></i></a></div><div class="author-card-society-icon"><a target="_blank" rel="noopener" href="https://mail.qq.com/cgi-bin/qm_share?t=qm_mailme&amp;email=5YSHh5Klg4qdiISMicuGiog"><i class="iconfont icon-mail society-icon"></i></a></div><div class="author-card-society-icon"><a href="/atom.xml"><i class="iconfont icon-RSS_filled society-icon"></i></a></div></div></div><div class="sticky-tablet"><article class="display-when-two-columns spacer"><div class="card card-content toc-card"><div class="toc-header"><i class="iconfont icon-menu" style="padding-right:2px"></i> 目录</div></div></article><article class="card card-content newcomment-widget"><div class="newcomment-card"><div class="newcomment-header"><i class="iconfont icon-Message" style="padding-right:2px"></i> 最新评论</div><script async src="//gcore.jsdelivr.net/gh/abbw/CDN/js/newcomment_waline.min.js"></script><div class="newcomment-list" data-api="https://waline.qzkyl.ml" data-num="7" data-key=""><span>加载最新评论中...</span></div><div></div></div></article><article class="card card-content categories-widget"><div class="categories-card"><div class="categories-header"><i class="iconfont icon-fenlei" style="padding-right:2px"></i> 分类</div><div class="categories-list"><a href="/categories/%E9%9A%8F%E7%AC%94/"><div class="categories-list-item">随笔 <span class="categories-list-item-badge">10</span></div></a><a href="/categories/Android/"><div class="categories-list-item">Android <span class="categories-list-item-badge">5</span></div></a><a href="/categories/%E6%95%99%E7%A8%8B/"><div class="categories-list-item">教程 <span class="categories-list-item-badge">24</span></div></a><a href="/categories/Windows/"><div class="categories-list-item">Windows <span class="categories-list-item-badge">6</span></div></a><a href="/categories/%E6%B1%82%E7%94%9F%E4%B9%8B%E8%B7%AF/"><div class="categories-list-item">求生之路 <span class="categories-list-item-badge">34</span></div></a><a href="/categories/Hexo%E7%9F%A5%E8%AF%86/"><div class="categories-list-item">Hexo知识 <span class="categories-list-item-badge">10</span></div></a><a href="/categories/Linux/"><div class="categories-list-item">Linux <span class="categories-list-item-badge">9</span></div></a></div></div></article><article class="card card-content tags-widget"><div class="tags-card"><div class="tags-header"><i class="iconfont icon-biaoqian" style="padding-right:2px"></i> 热门标签</div><div class="tags-list"><a href="/tags/sp%E6%BA%90%E7%A0%81/" title="sp源码"><div class="tags-list-item">sp源码</div></a><a href="/tags/smx%E6%8F%92%E4%BB%B6/" title="smx插件"><div class="tags-list-item">smx插件</div></a><a href="/tags/Hexo/" title="Hexo"><div class="tags-list-item">Hexo</div></a><a href="/tags/%E8%BD%AF%E4%BB%B6/" title="软件"><div class="tags-list-item">软件</div></a><a href="/tags/Linux%E8%84%9A%E6%9C%AC/" title="Linux脚本"><div class="tags-list-item">Linux脚本</div></a><a href="/tags/Shadowsocks/" title="Shadowsocks"><div class="tags-list-item">Shadowsocks</div></a><a href="/tags/Valine/" title="Valine"><div class="tags-list-item">Valine</div></a><a href="/tags/Artalk/" title="Artalk"><div class="tags-list-item">Artalk</div></a><a href="/tags/magisk/" title="magisk"><div class="tags-list-item">magisk</div></a><a href="/tags/leancloud/" title="leancloud"><div class="tags-list-item">leancloud</div></a><a href="/tags/Github-Actions/" title="Github Actions"><div class="tags-list-item">Github Actions</div></a><a href="/tags/travis-ci/" title="travis-ci"><div class="tags-list-item">travis-ci</div></a><a href="/tags/%E6%AD%A5%E6%95%B0/" title="步数"><div class="tags-list-item">步数</div></a><a href="/tags/Gitee/" title="Gitee"><div class="tags-list-item">Gitee</div></a><a href="/tags/HTML/" title="HTML"><div class="tags-list-item">HTML</div></a><a href="/tags/Cloudflare/" title="Cloudflare"><div class="tags-list-item">Cloudflare</div></a></div></div></article></div></aside><main class="main-column"><div class="image-wrapper"><img src="https://gcore.jsdelivr.net/gh/abbw/CDN/img/random/scenery/5.jpg" data-src="https://gcore.jsdelivr.net/gh/abbw/CDN/img/random/scenery/5.jpg" class="image lozad" alt="thumbnail" srcset="https://gcore.jsdelivr.net/gh/abbw/CDN/img/ld3.gif"></div><article class="card card-content"><header><h1 class="post-title">一个别有风格的自杀插件</h1></header><div class="post-meta post-show-meta"><time datetime="2018-10-24T04:01:02.000Z"><i class="iconfont icon-calendar" style="margin-right:2px"></i> <span>2018-10-24</span></time><span class="dot"></span> <a href="/categories/%E6%B1%82%E7%94%9F%E4%B9%8B%E8%B7%AF/" class="post-meta-link">求生之路</a><span class="dot"></span> <span>1.6k 字</span><span class="dot"></span><span id="leancloud-post-views-container"></span><span id="leancloud-post-views"></span> 人看过</div><div class="post__expire" id="post-expired-notify"><p>本文最后更新于&nbsp;<span id="expire-date"></span>&nbsp;天前，文中部分描述可能已经过时</p></div><script>var update=Date.parse("2018-10-24");date=new Date,now=date.getTime(),expire=now-update,expire_days=Math.floor(expire/864e5),expire_days>=100&&(document.querySelectorAll("#expire-date")[0].innerHTML=expire_days,document.querySelectorAll("#post-expired-notify")[0].style.display="block")</script><div id="section" class="post-content"><p>以火箭方式发射到天空，然后爆炸死亡，未加特效，需要自行修改</p><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br><span class="line">74</span><br><span class="line">75</span><br><span class="line">76</span><br><span class="line">77</span><br><span class="line">78</span><br><span class="line">79</span><br><span class="line">80</span><br><span class="line">81</span><br><span class="line">82</span><br><span class="line">83</span><br><span class="line">84</span><br><span class="line">85</span><br><span class="line">86</span><br><span class="line">87</span><br><span class="line">88</span><br><span class="line">89</span><br><span class="line">90</span><br><span class="line">91</span><br><span class="line">92</span><br><span class="line">93</span><br><span class="line">94</span><br><span class="line">95</span><br><span class="line">96</span><br><span class="line">97</span><br><span class="line">98</span><br><span class="line">99</span><br><span class="line">100</span><br><span class="line">101</span><br><span class="line">102</span><br><span class="line">103</span><br><span class="line">104</span><br><span class="line">105</span><br><span class="line">106</span><br><span class="line">107</span><br><span class="line">108</span><br><span class="line">109</span><br><span class="line">110</span><br><span class="line">111</span><br><span class="line">112</span><br><span class="line">113</span><br><span class="line">114</span><br><span class="line">115</span><br><span class="line">116</span><br><span class="line">117</span><br><span class="line">118</span><br><span class="line">119</span><br><span class="line">120</span><br><span class="line">121</span><br><span class="line">122</span><br><span class="line">123</span><br><span class="line">124</span><br><span class="line">125</span><br><span class="line">126</span><br><span class="line">127</span><br><span class="line">128</span><br><span class="line">129</span><br><span class="line">130</span><br><span class="line">131</span><br><span class="line">132</span><br><span class="line">133</span><br><span class="line">134</span><br><span class="line">135</span><br><span class="line">136</span><br><span class="line">137</span><br><span class="line">138</span><br><span class="line">139</span><br><span class="line">140</span><br><span class="line">141</span><br><span class="line">142</span><br><span class="line">143</span><br><span class="line">144</span><br><span class="line">145</span><br><span class="line">146</span><br><span class="line">147</span><br><span class="line">148</span><br><span class="line">149</span><br><span class="line">150</span><br><span class="line">151</span><br><span class="line">152</span><br><span class="line">153</span><br><span class="line">154</span><br><span class="line">155</span><br><span class="line">156</span><br><span class="line">157</span><br><span class="line">158</span><br><span class="line">159</span><br><span class="line">160</span><br><span class="line">161</span><br><span class="line">162</span><br><span class="line">163</span><br><span class="line">164</span><br><span class="line">165</span><br><span class="line">166</span><br><span class="line">167</span><br><span class="line">168</span><br><span class="line">169</span><br><span class="line">170</span><br><span class="line">171</span><br><span class="line">172</span><br><span class="line">173</span><br><span class="line">174</span><br><span class="line">175</span><br><span class="line">176</span><br><span class="line">177</span><br><span class="line">178</span><br><span class="line">179</span><br><span class="line">180</span><br><span class="line">181</span><br><span class="line">182</span><br><span class="line">183</span><br><span class="line">184</span><br><span class="line">185</span><br><span class="line">186</span><br><span class="line">187</span><br><span class="line">188</span><br><span class="line">189</span><br><span class="line">190</span><br><span class="line">191</span><br><span class="line">192</span><br><span class="line">193</span><br><span class="line">194</span><br><span class="line">195</span><br><span class="line">196</span><br><span class="line">197</span><br><span class="line">198</span><br><span class="line">199</span><br><span class="line">200</span><br><span class="line">201</span><br><span class="line">202</span><br><span class="line">203</span><br><span class="line">204</span><br><span class="line">205</span><br><span class="line">206</span><br><span class="line">207</span><br><span class="line">208</span><br><span class="line">209</span><br><span class="line">210</span><br><span class="line">211</span><br><span class="line">212</span><br><span class="line">213</span><br><span class="line">214</span><br><span class="line">215</span><br><span class="line">216</span><br><span class="line">217</span><br><span class="line">218</span><br><span class="line">219</span><br><span class="line">220</span><br><span class="line">221</span><br><span class="line">222</span><br><span class="line">223</span><br><span class="line">224</span><br><span class="line">225</span><br><span class="line">226</span><br><span class="line">227</span><br><span class="line">228</span><br><span class="line">229</span><br><span class="line">230</span><br><span class="line">231</span><br><span class="line">232</span><br><span class="line">233</span><br><span class="line">234</span><br><span class="line">235</span><br><span class="line">236</span><br><span class="line">237</span><br><span class="line">238</span><br><span class="line">239</span><br><span class="line">240</span><br><span class="line">241</span><br><span class="line">242</span><br><span class="line">243</span><br><span class="line">244</span><br><span class="line">245</span><br><span class="line">246</span><br><span class="line">247</span><br><span class="line">248</span><br><span class="line">249</span><br><span class="line">250</span><br><span class="line">251</span><br><span class="line">252</span><br><span class="line">253</span><br><span class="line">254</span><br><span class="line">255</span><br><span class="line">256</span><br><span class="line">257</span><br><span class="line">258</span><br><span class="line">259</span><br><span class="line">260</span><br><span class="line">261</span><br><span class="line">262</span><br><span class="line">263</span><br><span class="line">264</span><br><span class="line">265</span><br><span class="line">266</span><br><span class="line">267</span><br><span class="line">268</span><br><span class="line">269</span><br><span class="line">270</span><br><span class="line">271</span><br><span class="line">272</span><br><span class="line">273</span><br><span class="line">274</span><br><span class="line">275</span><br><span class="line">276</span><br><span class="line">277</span><br><span class="line">278</span><br><span class="line">279</span><br><span class="line">280</span><br><span class="line">281</span><br><span class="line">282</span><br><span class="line">283</span><br><span class="line">284</span><br><span class="line">285</span><br><span class="line">286</span><br><span class="line">287</span><br><span class="line">288</span><br><span class="line">289</span><br><span class="line">290</span><br><span class="line">291</span><br><span class="line">292</span><br><span class="line">293</span><br><span class="line">294</span><br><span class="line">295</span><br><span class="line">296</span><br><span class="line">297</span><br><span class="line">298</span><br><span class="line">299</span><br><span class="line">300</span><br><span class="line">301</span><br><span class="line">302</span><br><span class="line">303</span><br><span class="line">304</span><br><span class="line">305</span><br><span class="line">306</span><br><span class="line">307</span><br><span class="line">308</span><br><span class="line">309</span><br><span class="line">310</span><br><span class="line">311</span><br><span class="line">312</span><br><span class="line">313</span><br><span class="line">314</span><br><span class="line">315</span><br><span class="line">316</span><br><span class="line">317</span><br><span class="line">318</span><br><span class="line">319</span><br><span class="line">320</span><br><span class="line">321</span><br><span class="line">322</span><br><span class="line">323</span><br><span class="line">324</span><br><span class="line">325</span><br><span class="line">326</span><br><span class="line">327</span><br><span class="line">328</span><br><span class="line">329</span><br><span class="line">330</span><br><span class="line">331</span><br><span class="line">332</span><br><span class="line">333</span><br><span class="line">334</span><br><span class="line">335</span><br><span class="line">336</span><br><span class="line">337</span><br><span class="line">338</span><br><span class="line">339</span><br><span class="line">340</span><br><span class="line">341</span><br><span class="line">342</span><br><span class="line">343</span><br><span class="line">344</span><br><span class="line">345</span><br><span class="line">346</span><br><span class="line">347</span><br><span class="line">348</span><br><span class="line">349</span><br><span class="line">350</span><br><span class="line">351</span><br><span class="line">352</span><br><span class="line">353</span><br><span class="line">354</span><br><span class="line">355</span><br><span class="line">356</span><br><span class="line">357</span><br><span class="line">358</span><br><span class="line">359</span><br><span class="line">360</span><br><span class="line">361</span><br><span class="line">362</span><br><span class="line">363</span><br><span class="line">364</span><br><span class="line">365</span><br><span class="line">366</span><br><span class="line">367</span><br><span class="line">368</span><br><span class="line">369</span><br><span class="line">370</span><br><span class="line">371</span><br><span class="line">372</span><br><span class="line">373</span><br><span class="line">374</span><br><span class="line">375</span><br><span class="line">376</span><br><span class="line">377</span><br><span class="line">378</span><br><span class="line">379</span><br><span class="line">380</span><br><span class="line">381</span><br><span class="line">382</span><br><span class="line">383</span><br><span class="line">384</span><br><span class="line">385</span><br><span class="line">386</span><br><span class="line">387</span><br><span class="line">388</span><br><span class="line">389</span><br><span class="line">390</span><br><span class="line">391</span><br><span class="line">392</span><br><span class="line">393</span><br><span class="line">394</span><br><span class="line">395</span><br><span class="line">396</span><br><span class="line">397</span><br><span class="line">398</span><br><span class="line">399</span><br><span class="line">400</span><br><span class="line">401</span><br><span class="line">402</span><br><span class="line">403</span><br><span class="line">404</span><br><span class="line">405</span><br><span class="line">406</span><br><span class="line">407</span><br><span class="line">408</span><br><span class="line">409</span><br><span class="line">410</span><br><span class="line">411</span><br><span class="line">412</span><br><span class="line">413</span><br><span class="line">414</span><br><span class="line">415</span><br><span class="line">416</span><br><span class="line">417</span><br><span class="line">418</span><br><span class="line">419</span><br><span class="line">420</span><br><span class="line">421</span><br><span class="line">422</span><br><span class="line">423</span><br><span class="line">424</span><br><span class="line">425</span><br><span class="line">426</span><br><span class="line">427</span><br><span class="line">428</span><br><span class="line">429</span><br><span class="line">430</span><br><span class="line">431</span><br><span class="line">432</span><br><span class="line">433</span><br><span class="line">434</span><br><span class="line">435</span><br><span class="line">436</span><br><span class="line">437</span><br><span class="line">438</span><br><span class="line">439</span><br><span class="line">440</span><br><span class="line">441</span><br><span class="line">442</span><br><span class="line">443</span><br><span class="line">444</span><br><span class="line">445</span><br><span class="line">446</span><br><span class="line">447</span><br><span class="line">448</span><br><span class="line">449</span><br><span class="line">450</span><br><span class="line">451</span><br><span class="line">452</span><br><span class="line">453</span><br><span class="line">454</span><br><span class="line">455</span><br><span class="line">456</span><br><span class="line">457</span><br><span class="line">458</span><br><span class="line">459</span><br><span class="line">460</span><br><span class="line">461</span><br><span class="line">462</span><br><span class="line">463</span><br><span class="line">464</span><br><span class="line">465</span><br><span class="line">466</span><br><span class="line">467</span><br><span class="line">468</span><br><span class="line">469</span><br><span class="line">470</span><br><span class="line">471</span><br><span class="line">472</span><br><span class="line">473</span><br><span class="line">474</span><br><span class="line">475</span><br><span class="line">476</span><br><span class="line">477</span><br><span class="line">478</span><br><span class="line">479</span><br><span class="line">480</span><br><span class="line">481</span><br><span class="line">482</span><br><span class="line">483</span><br><span class="line">484</span><br><span class="line">485</span><br><span class="line">486</span><br><span class="line">487</span><br><span class="line">488</span><br><span class="line">489</span><br><span class="line">490</span><br><span class="line">491</span><br><span class="line">492</span><br><span class="line">493</span><br><span class="line">494</span><br><span class="line">495</span><br><span class="line">496</span><br><span class="line">497</span><br><span class="line">498</span><br><span class="line">499</span><br><span class="line">500</span><br><span class="line">501</span><br><span class="line">502</span><br><span class="line">503</span><br><span class="line">504</span><br><span class="line">505</span><br><span class="line">506</span><br><span class="line">507</span><br><span class="line">508</span><br><span class="line">509</span><br><span class="line">510</span><br><span class="line">511</span><br><span class="line">512</span><br><span class="line">513</span><br><span class="line">514</span><br><span class="line">515</span><br><span class="line">516</span><br><span class="line">517</span><br><span class="line">518</span><br><span class="line">519</span><br><span class="line">520</span><br></pre></td><td class="code"><pre><span class="line">#include &lt;sourcemod&gt;</span><br><span class="line">#include &lt;sdktools&gt;</span><br><span class="line">#include &lt;sdktools_functions&gt;</span><br><span class="line">#undef REQUIRE_PLUGIN</span><br><span class="line">#include &lt;adminmenu&gt;</span><br><span class="line"></span><br><span class="line">new Handle:hAdminMenu = INVALID_HANDLE</span><br><span class="line"></span><br><span class="line">new Handle:Cvar_RocketMe = INVALID_HANDLE</span><br><span class="line"></span><br><span class="line">new gametype = 0</span><br><span class="line">new g_Explosion</span><br><span class="line"></span><br><span class="line">new g_Ent[MAXPLAYERS+1]</span><br><span class="line">new String:GameName[64]</span><br><span class="line"></span><br><span class="line">new bool:IsBonusRound = false</span><br><span class="line"></span><br><span class="line">#define PLUGIN_VERSION &quot;1.0.110&quot;</span><br><span class="line"></span><br><span class="line">// Functions</span><br><span class="line">public Plugin:myinfo =</span><br><span class="line">&#123;</span><br><span class="line">	name = &quot;Evil Admin - Rocket&quot;,</span><br><span class="line">	author = &quot;&lt;eVa&gt;Dog&quot;,</span><br><span class="line">	description = &quot;Make a rocket with a player&quot;,</span><br><span class="line">	version = PLUGIN_VERSION,</span><br><span class="line">	url = &quot;http://www.theville.org&quot;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line">public OnPluginStart()</span><br><span class="line">&#123;</span><br><span class="line">	CreateConVar(&quot;sm_evilrocket_version&quot;, PLUGIN_VERSION, &quot;Evil Rocket插件版本&quot;, FCVAR_PLUGIN|FCVAR_SPONLY|FCVAR_REPLICATED|FCVAR_NOTIFY)</span><br><span class="line">	Cvar_RocketMe = CreateConVar(&quot;sm_rocketme_enabled&quot;, &quot;0&quot;, &quot;允許玩家把自己變成火箭&quot;, FCVAR_PLUGIN)</span><br><span class="line">	</span><br><span class="line">	RegAdminCmd(&quot;sm_zisha&quot;, Command_EvilRocket, ADMFLAG_SLAY, &quot;sm_evilrocket &lt;#userid|name&gt;&quot;)</span><br><span class="line">	RegConsoleCmd(&quot;sm_kill&quot;, Command_RocketMe, &quot;一個有趣的自殺方法&quot;)</span><br><span class="line">	</span><br><span class="line">	LoadTranslations(&quot;common.phrases&quot;)</span><br><span class="line">	</span><br><span class="line">	GetGameFolderName(GameName, sizeof(GameName))</span><br><span class="line">	</span><br><span class="line">	if (StrEqual(GameName, &quot;tf&quot;))</span><br><span class="line">	&#123;</span><br><span class="line">		HookEvent(&quot;teamplay_round_win&quot;, RoundWinEvent)</span><br><span class="line">		HookEvent(&quot;teamplay_round_active&quot;, RoundStartEvent)</span><br><span class="line">	&#125;</span><br><span class="line">	else if (StrEqual(GameName, &quot;dod&quot;))</span><br><span class="line">	&#123;</span><br><span class="line">		HookEvent(&quot;dod_round_win&quot;, RoundWinEvent)</span><br><span class="line">		HookEvent(&quot;dod_round_active&quot;, RoundStartEvent)</span><br><span class="line">	&#125;</span><br><span class="line">	</span><br><span class="line">	new Handle:topmenu</span><br><span class="line">	if (LibraryExists(&quot;adminmenu&quot;) &amp;&amp; ((topmenu = GetAdminTopMenu()) != INVALID_HANDLE))</span><br><span class="line">	&#123;</span><br><span class="line">		OnAdminMenuReady(topmenu)</span><br><span class="line">	&#125;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line">public Action:RoundWinEvent(Handle:event, const String:name[], bool:dontBroadcast)</span><br><span class="line">&#123;</span><br><span class="line">	IsBonusRound = true</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line">public Action:RoundStartEvent(Handle:event, const String:name[], bool:dontBroadcast)</span><br><span class="line">&#123;</span><br><span class="line">	IsBonusRound = false</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line">public OnEventShutdown()</span><br><span class="line">&#123;</span><br><span class="line">	if (StrEqual(GameName, &quot;tf&quot;))</span><br><span class="line">	&#123;</span><br><span class="line">		UnhookEvent(&quot;teamplay_round_win&quot;, RoundWinEvent)</span><br><span class="line">		UnhookEvent(&quot;teamplay_round_active&quot;, RoundStartEvent)</span><br><span class="line">	&#125;</span><br><span class="line">	else if (StrEqual(GameName, &quot;dod&quot;))</span><br><span class="line">	&#123;</span><br><span class="line">		UnhookEvent(&quot;dod_round_win&quot;, RoundWinEvent)</span><br><span class="line">		UnhookEvent(&quot;dod_round_active&quot;, RoundStartEvent)</span><br><span class="line">	&#125;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line">public OnMapStart()</span><br><span class="line">&#123;</span><br><span class="line">	if (StrEqual(GameName, &quot;tf&quot;))</span><br><span class="line">	&#123;</span><br><span class="line">		gametype = 1</span><br><span class="line">	&#125;</span><br><span class="line">	else if (StrEqual(GameName, &quot;dod&quot;))</span><br><span class="line">	&#123;</span><br><span class="line">		gametype = 2</span><br><span class="line">	&#125;</span><br><span class="line">	else </span><br><span class="line">	&#123;</span><br><span class="line">		gametype = 0</span><br><span class="line">	&#125;</span><br><span class="line">	</span><br><span class="line">	g_Explosion = PrecacheModel(&quot;sprites/sprite_fire01.vmt&quot;)</span><br><span class="line">	</span><br><span class="line">	PrecacheSound(&quot;ambient/explosions/exp2.wav&quot;, true)</span><br><span class="line">	PrecacheSound(&quot;npc/env_headcrabcanister/launch.wav&quot;, true)</span><br><span class="line">	PrecacheSound(&quot;weapons/rpg/rocketfire1.wav&quot;, true)</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line">public Action:Command_EvilRocket(client, args)</span><br><span class="line">&#123;</span><br><span class="line">	decl String:target[65]</span><br><span class="line">	decl String:target_name[MAX_TARGET_LENGTH]</span><br><span class="line">	decl target_list[MAXPLAYERS]</span><br><span class="line">	decl target_count</span><br><span class="line">	decl bool:tn_is_ml</span><br><span class="line">	</span><br><span class="line">	if (args &lt; 1)</span><br><span class="line">	&#123;</span><br><span class="line">		ReplyToCommand(client, &quot;[提示] 用法: sm_evilrocket &lt;#userid|name&gt;&quot;);</span><br><span class="line">		return Plugin_Handled</span><br><span class="line">	&#125;</span><br><span class="line">	</span><br><span class="line">	GetCmdArg(1, target, sizeof(target))</span><br><span class="line">	</span><br><span class="line">	if ((target_count = ProcessTargetString(</span><br><span class="line">			target,</span><br><span class="line">			client,</span><br><span class="line">			target_list,</span><br><span class="line">			MAXPLAYERS,</span><br><span class="line">			0,</span><br><span class="line">			target_name,</span><br><span class="line">			sizeof(target_name),</span><br><span class="line">			tn_is_ml)) &lt;= 0)</span><br><span class="line">	&#123;</span><br><span class="line">		ReplyToTargetError(client, target_count)</span><br><span class="line">		return Plugin_Handled</span><br><span class="line">	&#125;</span><br><span class="line">		</span><br><span class="line">	for (new i = 0; i &lt; target_count; i++)</span><br><span class="line">	&#123;</span><br><span class="line">		if (IsClientInGame(target_list[i]) &amp;&amp; IsPlayerAlive(target_list[i]))</span><br><span class="line">		&#123;</span><br><span class="line">			PerformEvilRocket(client, target_list[i])</span><br><span class="line">		&#125;</span><br><span class="line">	&#125;</span><br><span class="line">	return Plugin_Handled</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line">PerformEvilRocket(client, target)</span><br><span class="line">&#123;</span><br><span class="line">	if (g_Ent[target] == 0)</span><br><span class="line">	&#123;</span><br><span class="line">		if (client != -1)</span><br><span class="line">		&#123;</span><br><span class="line">			LogAction(client, target, &quot;\&quot;%L\&quot;把\&quot;%L\&quot;送到太空了&quot;, client, target)</span><br><span class="line">			ShowActivity(client, &quot;已发射 \%N 到太空&quot;, target) </span><br><span class="line">			</span><br><span class="line">			if (gametype == 1)</span><br><span class="line">			&#123;</span><br><span class="line">				AttachParticle(target, &quot;rockettrail_!&quot;)</span><br><span class="line">			&#125;</span><br><span class="line">			else if (gametype == 2)</span><br><span class="line">			&#123;</span><br><span class="line">				AttachParticle(target, &quot;rockettrail&quot;)</span><br><span class="line">			&#125;</span><br><span class="line">			else</span><br><span class="line">			&#123;</span><br><span class="line">				AttachFlame(target)</span><br><span class="line">			&#125;</span><br><span class="line">			EmitSoundToAll(&quot;weapons/rpg/rocketfire1.wav&quot;, target, _, _, _, 0.8)</span><br><span class="line">			CreateTimer(2.0, Launch, target)</span><br><span class="line">			CreateTimer(3.5, Detonate, target)</span><br><span class="line">		&#125;</span><br><span class="line">		else</span><br><span class="line">		&#123;</span><br><span class="line">			if (gametype == 1)</span><br><span class="line">			&#123;</span><br><span class="line">				AttachParticle(target, &quot;rockettrail_!&quot;)</span><br><span class="line">			&#125;</span><br><span class="line">			else if (gametype == 2)</span><br><span class="line">			&#123;</span><br><span class="line">				AttachParticle(target, &quot;rockettrail&quot;)</span><br><span class="line">			&#125;</span><br><span class="line">			else</span><br><span class="line">			&#123;</span><br><span class="line">				AttachFlame(target)</span><br><span class="line">			&#125;</span><br><span class="line">			EmitSoundToAll(&quot;weapons/rpg/rocketfire1.wav&quot;, target, _, _, _, 0.8)</span><br><span class="line">			CreateTimer(2.0, Launch, target)</span><br><span class="line">			CreateTimer(3.5, Detonate, target)</span><br><span class="line">		&#125;</span><br><span class="line">	&#125;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line">public Action:Launch(Handle:timer, any:client)</span><br><span class="line">&#123;</span><br><span class="line">	if (IsClientInGame(client))</span><br><span class="line">	&#123;</span><br><span class="line">		new Float:vVel[3]</span><br><span class="line">			</span><br><span class="line">		vVel[0] = 0.0</span><br><span class="line">		vVel[1] = 0.0</span><br><span class="line">		vVel[2] = 800.0</span><br><span class="line">		</span><br><span class="line">		EmitSoundToAll(&quot;ambient/explosions/exp2.wav&quot;, client, _, _, _, 1.0)</span><br><span class="line">		EmitSoundToAll(&quot;npc/env_headcrabcanister/launch.wav&quot;, client, _, _, _, 1.0)</span><br><span class="line">		</span><br><span class="line">		TeleportEntity(client, NULL_VECTOR, NULL_VECTOR, vVel)</span><br><span class="line">		SetEntityGravity(client, 0.1)</span><br><span class="line">	&#125;</span><br><span class="line">			</span><br><span class="line">	return Plugin_Handled</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line">public Action:Detonate(Handle:timer, any:client)</span><br><span class="line">&#123;</span><br><span class="line">	if (IsClientInGame(client))</span><br><span class="line">	&#123;</span><br><span class="line">		new Float:vPlayer[3]</span><br><span class="line">		GetClientAbsOrigin(client, vPlayer)</span><br><span class="line">			 </span><br><span class="line">		if (gametype == 1)</span><br><span class="line">		&#123;	</span><br><span class="line">			DeleteParticle(g_Ent[client])</span><br><span class="line">			g_Ent[client] = 0</span><br><span class="line">			</span><br><span class="line">			if (IsBonusRound)</span><br><span class="line">			&#123;</span><br><span class="line">				new Float:ClientOrigin[3]</span><br><span class="line">				GetClientAbsOrigin(client, ClientOrigin)</span><br><span class="line"></span><br><span class="line">				new g_ent = CreateEntityByName(&quot;env_explosion&quot;)</span><br><span class="line">				DispatchKeyValue(g_ent, &quot;iMagnitude&quot;, &quot;2000&quot;)</span><br><span class="line">				DispatchKeyValue(g_ent, &quot;iRadiusOverride&quot;, &quot;15&quot;)</span><br><span class="line">				DispatchSpawn(g_ent)</span><br><span class="line">				TeleportEntity(g_ent, ClientOrigin, NULL_VECTOR, NULL_VECTOR)</span><br><span class="line">				AcceptEntityInput(g_ent, &quot;Explode&quot;)</span><br><span class="line">				CreateTimer(3.0, KillExplosion, g_ent)</span><br><span class="line">			&#125;</span><br><span class="line">			else</span><br><span class="line">			&#123;</span><br><span class="line">				FakeClientCommand(client, &quot;Explode&quot;)</span><br><span class="line">			&#125;</span><br><span class="line">		&#125;</span><br><span class="line">		else if (gametype == 2)</span><br><span class="line">		&#123;	</span><br><span class="line">			DeleteParticle(g_Ent[client])</span><br><span class="line">			g_Ent[client] = 0</span><br><span class="line">			</span><br><span class="line">			FakeClientCommand(client, &quot;Explode&quot;)</span><br><span class="line">		&#125;</span><br><span class="line">		else</span><br><span class="line">		&#123;</span><br><span class="line">			TE_SetupExplosion(vPlayer, g_Explosion, 10.0, 1, 0, 600, 5000)</span><br><span class="line">			TE_SendToAll()</span><br><span class="line">			g_Ent[client] = 0</span><br><span class="line">			</span><br><span class="line">			ForcePlayerSuicide(client)</span><br><span class="line">		&#125;</span><br><span class="line">			</span><br><span class="line">		SetEntityGravity(client, 1.0)</span><br><span class="line">	&#125;</span><br><span class="line">	return Plugin_Handled</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line">public Action:KillExplosion(Handle:timer, any:ent)</span><br><span class="line">&#123;</span><br><span class="line">    if (IsValidEntity(ent))</span><br><span class="line">    &#123;</span><br><span class="line">        new String:classname[256]</span><br><span class="line">        GetEdictClassname(ent, classname, sizeof(classname))</span><br><span class="line">        if (StrEqual(classname, &quot;env_explosion&quot;, false))</span><br><span class="line">        &#123;</span><br><span class="line">            RemoveEdict(ent)</span><br><span class="line">        &#125;</span><br><span class="line">    &#125;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line">public OnLibraryRemoved(const String:name[])</span><br><span class="line">&#123;</span><br><span class="line">	if (StrEqual(name, &quot;adminmenu&quot;)) </span><br><span class="line">	&#123;</span><br><span class="line">		hAdminMenu = INVALID_HANDLE;</span><br><span class="line">	&#125;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line">public OnAdminMenuReady(Handle:topmenu)</span><br><span class="line">&#123;</span><br><span class="line">	if (topmenu == hAdminMenu)</span><br><span class="line">	&#123;</span><br><span class="line">		return;</span><br><span class="line">	&#125;</span><br><span class="line">	</span><br><span class="line">	hAdminMenu = topmenu</span><br><span class="line"></span><br><span class="line">	new TopMenuObject:player_commands = FindTopMenuCategory(hAdminMenu, ADMINMENU_PLAYERCOMMANDS)</span><br><span class="line"></span><br><span class="line">	if (player_commands != INVALID_TOPMENUOBJECT)</span><br><span class="line">	&#123;</span><br><span class="line">		AddToTopMenu(hAdminMenu,</span><br><span class="line">			&quot;sm_evilrocket&quot;,</span><br><span class="line">			TopMenuObject_Item,</span><br><span class="line">			AdminMenu_rocket, </span><br><span class="line">			player_commands,</span><br><span class="line">			&quot;sm_evilrocket&quot;,</span><br><span class="line">			ADMFLAG_SLAY)</span><br><span class="line">	&#125;</span><br><span class="line">&#125;</span><br><span class="line"> </span><br><span class="line">public AdminMenu_rocket( Handle:topmenu, TopMenuAction:action, TopMenuObject:object_id, param, String:buffer[], maxlength )</span><br><span class="line">&#123;</span><br><span class="line">	if (action == TopMenuAction_DisplayOption)</span><br><span class="line">	&#123;</span><br><span class="line">		Format(buffer, maxlength, &quot;恶魔火箭&quot;)</span><br><span class="line">	&#125;</span><br><span class="line">	else if( action == TopMenuAction_SelectOption)</span><br><span class="line">	&#123;</span><br><span class="line">		DisplayPlayerMenu(param)</span><br><span class="line">	&#125;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line">DisplayPlayerMenu(client)</span><br><span class="line">&#123;</span><br><span class="line">	new Handle:menu = CreateMenu(MenuHandler_Players)</span><br><span class="line">	</span><br><span class="line">	decl String:title[100]</span><br><span class="line">	Format(title, sizeof(title), &quot;选择玩家:&quot;)</span><br><span class="line">	SetMenuTitle(menu, title)</span><br><span class="line">	SetMenuExitBackButton(menu, true)</span><br><span class="line">	</span><br><span class="line">	AddTargetsToMenu(menu, client, true, true)</span><br><span class="line">	</span><br><span class="line">	DisplayMenu(menu, client, MENU_TIME_FOREVER)</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line">public MenuHandler_Players(Handle:menu, MenuAction:action, param1, param2)</span><br><span class="line">&#123;</span><br><span class="line">	if (action == MenuAction_End)</span><br><span class="line">	&#123;</span><br><span class="line">		CloseHandle(menu)</span><br><span class="line">	&#125;</span><br><span class="line">	else if (action == MenuAction_Cancel)</span><br><span class="line">	&#123;</span><br><span class="line">		if (param2 == MenuCancel_ExitBack &amp;&amp; hAdminMenu != INVALID_HANDLE)</span><br><span class="line">		&#123;</span><br><span class="line">			DisplayTopMenu(hAdminMenu, param1, TopMenuPosition_LastCategory);</span><br><span class="line">		&#125;</span><br><span class="line">	&#125;</span><br><span class="line">	else if (action == MenuAction_Select)</span><br><span class="line">	&#123;</span><br><span class="line">		decl String:info[32]</span><br><span class="line">		new userid, target</span><br><span class="line">		</span><br><span class="line">		GetMenuItem(menu, param2, info, sizeof(info))</span><br><span class="line">		userid = StringToInt(info)</span><br><span class="line"></span><br><span class="line">		if ((target = GetClientOfUserId(userid)) == 0)</span><br><span class="line">		&#123;</span><br><span class="line">			PrintToChat(param1, &quot;[提示] %s&quot;, &quot;玩家非長期可用&quot;)</span><br><span class="line">		&#125;</span><br><span class="line">		else if (!CanUserTarget(param1, target))</span><br><span class="line">		&#123;</span><br><span class="line">			PrintToChat(param1, &quot;[提示] %s&quot;, &quot;目标不可用&quot;)</span><br><span class="line">		&#125;</span><br><span class="line">		else</span><br><span class="line">		&#123;					</span><br><span class="line">			PerformEvilRocket(param1, target)</span><br><span class="line">		&#125;</span><br><span class="line">		</span><br><span class="line">		/* Re-draw the menu if they&#x27;re still valid */</span><br><span class="line">		if (IsClientInGame(param1) &amp;&amp; !IsClientInKickQueue(param1))</span><br><span class="line">		&#123;</span><br><span class="line">			DisplayPlayerMenu(param1)</span><br><span class="line">		&#125;</span><br><span class="line">	&#125;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line">AttachParticle(ent, String:particleType[])</span><br><span class="line">&#123;</span><br><span class="line">	new particle = CreateEntityByName(&quot;info_particle_system&quot;)</span><br><span class="line">	</span><br><span class="line">	new String:tName[128], String:pName[128]</span><br><span class="line">	if (IsValidEdict(particle))</span><br><span class="line">	&#123;</span><br><span class="line">		new Float:pos[3] </span><br><span class="line">		GetEntPropVector(ent, Prop_Send, &quot;m_vecOrigin&quot;, pos)</span><br><span class="line">		</span><br><span class="line">		if (gametype == 1)</span><br><span class="line">		&#123;</span><br><span class="line">			pos[2] += 10</span><br><span class="line">			TeleportEntity(particle, pos, NULL_VECTOR, NULL_VECTOR)</span><br><span class="line">		&#125;</span><br><span class="line">		else if (gametype == 2)</span><br><span class="line">		&#123;</span><br><span class="line">			pos[2] += 50</span><br><span class="line">			TeleportEntity(particle, pos, NULL_VECTOR, NULL_VECTOR)</span><br><span class="line">		&#125;</span><br><span class="line">		</span><br><span class="line">		Format(tName, sizeof(tName), &quot;target%i&quot;, ent)</span><br><span class="line">		DispatchKeyValue(ent, &quot;targetname&quot;, tName)</span><br><span class="line">		</span><br><span class="line">		Format(pName, sizeof(pName), &quot;particle%i&quot;, ent)</span><br><span class="line">		DispatchKeyValue(particle, &quot;targetname&quot;, pName)</span><br><span class="line">		</span><br><span class="line">		DispatchKeyValue(particle, &quot;parentname&quot;, tName)</span><br><span class="line">		DispatchKeyValue(particle, &quot;effect_name&quot;, particleType)</span><br><span class="line">		DispatchSpawn(particle)</span><br><span class="line">		</span><br><span class="line">		SetVariantString(tName)</span><br><span class="line">		AcceptEntityInput(particle, &quot;SetParent&quot;, particle, particle, 0)</span><br><span class="line">		</span><br><span class="line">		if (gametype == 1)</span><br><span class="line">		&#123;</span><br><span class="line">			SetVariantString(&quot;flag&quot;)</span><br><span class="line">			AcceptEntityInput(particle, &quot;SetParentAttachment&quot;, particle, particle, 0)</span><br><span class="line">		&#125;</span><br><span class="line">		ActivateEntity(particle)</span><br><span class="line">		AcceptEntityInput(particle, &quot;start&quot;)</span><br><span class="line">		</span><br><span class="line">		g_Ent[ent] = particle</span><br><span class="line">	&#125;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line">DeleteParticle(any:particle)</span><br><span class="line">&#123;</span><br><span class="line">    if (IsValidEntity(particle))</span><br><span class="line">    &#123;</span><br><span class="line">        new String:classname[256]</span><br><span class="line">        GetEdictClassname(particle, classname, sizeof(classname))</span><br><span class="line">        if (StrEqual(classname, &quot;info_particle_system&quot;, false))</span><br><span class="line">        &#123;</span><br><span class="line">            RemoveEdict(particle)</span><br><span class="line">        &#125;</span><br><span class="line">    &#125;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line">AttachFlame(ent)</span><br><span class="line">&#123;</span><br><span class="line">	new String:flame_name[128]</span><br><span class="line">	Format(flame_name, sizeof(flame_name), &quot;RocketFlame%i&quot;, ent)</span><br><span class="line">	</span><br><span class="line">	new String:tName[128]</span><br><span class="line">	</span><br><span class="line">	new flame = CreateEntityByName(&quot;env_steam&quot;)</span><br><span class="line">	if (IsValidEdict(flame))</span><br><span class="line">	&#123;</span><br><span class="line">		new Float:pos[3] </span><br><span class="line">		GetEntPropVector(ent, Prop_Send, &quot;m_vecOrigin&quot;, pos)</span><br><span class="line">		pos[2] += 30</span><br><span class="line">		</span><br><span class="line">		new Float:angles[3]</span><br><span class="line">		angles[0] = 90.0</span><br><span class="line">		angles[1] = 0.0</span><br><span class="line">		angles[2] = 0.0</span><br><span class="line">		</span><br><span class="line">		Format(tName, sizeof(tName), &quot;target%i&quot;, ent)</span><br><span class="line">		DispatchKeyValue(ent, &quot;targetname&quot;, tName)</span><br><span class="line">		</span><br><span class="line">		DispatchKeyValue(flame,&quot;targetname&quot;, flame_name)</span><br><span class="line">		DispatchKeyValue(flame, &quot;parentname&quot;, tName)</span><br><span class="line">		DispatchKeyValue(flame,&quot;SpawnFlags&quot;, &quot;1&quot;)</span><br><span class="line">		DispatchKeyValue(flame,&quot;Type&quot;, &quot;0&quot;)</span><br><span class="line">		DispatchKeyValue(flame,&quot;InitialState&quot;, &quot;1&quot;)</span><br><span class="line">		DispatchKeyValue(flame,&quot;Spreadspeed&quot;, &quot;10&quot;)</span><br><span class="line">		DispatchKeyValue(flame,&quot;Speed&quot;, &quot;800&quot;)</span><br><span class="line">		DispatchKeyValue(flame,&quot;Startsize&quot;, &quot;10&quot;)</span><br><span class="line">		DispatchKeyValue(flame,&quot;EndSize&quot;, &quot;250&quot;)</span><br><span class="line">		DispatchKeyValue(flame,&quot;Rate&quot;, &quot;15&quot;)</span><br><span class="line">		DispatchKeyValue(flame,&quot;JetLength&quot;, &quot;400&quot;)</span><br><span class="line">		DispatchKeyValue(flame,&quot;RenderColor&quot;, &quot;180 71 8&quot;)</span><br><span class="line">		DispatchKeyValue(flame,&quot;RenderAmt&quot;, &quot;180&quot;)</span><br><span class="line">		DispatchSpawn(flame)</span><br><span class="line">		TeleportEntity(flame, pos, angles, NULL_VECTOR)</span><br><span class="line">		SetVariantString(tName)</span><br><span class="line">		AcceptEntityInput(flame, &quot;SetParent&quot;, flame, flame, 0)</span><br><span class="line">		</span><br><span class="line">		CreateTimer(3.0, DeleteFlame, flame)</span><br><span class="line">		</span><br><span class="line">		g_Ent[ent] = flame</span><br><span class="line">	&#125;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line">public Action:DeleteFlame(Handle:timer, any:ent)</span><br><span class="line">&#123;</span><br><span class="line">	if (IsValidEntity(ent))</span><br><span class="line">    &#123;</span><br><span class="line">        new String:classname[256]</span><br><span class="line">        GetEdictClassname(ent, classname, sizeof(classname))</span><br><span class="line">        if (StrEqual(classname, &quot;env_steam&quot;, false))</span><br><span class="line">        &#123;</span><br><span class="line">            RemoveEdict(ent)</span><br><span class="line">        &#125;</span><br><span class="line">    &#125;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line">public Action:Command_RocketMe(client, args)</span><br><span class="line">&#123;</span><br><span class="line">     if (IsClientInGame(client) &amp;&amp; IsPlayerAlive(client))</span><br><span class="line">     &#123;</span><br><span class="line">          PerformEvilRocket(-1, client)</span><br><span class="line">          CreateTimer(3.0, MessageUs, client)</span><br><span class="line">     &#125;</span><br><span class="line">     else if (GetConVarInt(Cvar_RocketMe))</span><br><span class="line">     &#123;</span><br><span class="line">          if (IsClientInGame(client) &amp;&amp; IsPlayerAlive(client))</span><br><span class="line">     &#123;</span><br><span class="line">          PerformEvilRocket(-1, client)</span><br><span class="line">          CreateTimer(3.0, MessageUs, client)</span><br><span class="line">     &#125;</span><br><span class="line">     &#125;</span><br><span class="line">     else</span><br><span class="line">     &#123;	</span><br><span class="line">          PrintToChat(client, &quot;[提示] 未允许把自己送进火箭。&quot;)</span><br><span class="line">     &#125;</span><br><span class="line"></span><br><span class="line">     return Plugin_Handled</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line">public Action:MessageUs(Handle:timer, any:client)</span><br><span class="line">&#123;</span><br><span class="line">	PrintToChatAll(&quot;[死亡] %N 死于火箭意外坠落身亡.&quot;, client)</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure></div><div><div class="post-note note-warning copyright" style="margin-top:42px"><p><span style="font-weight:700">作者：</span> <a target="_blank" rel="nofollow noopener noreferrer" href="mailto:abbw@foxmail.com">笨蛋海绵</a></p><p><span style="font-weight:700">文章链接：</span> <a target="_blank" rel="nofollow noopener noreferrer" href="https://qzkyl.ml/posts/35186.html">https://qzkyl.ml/posts/35186.html</a></p><p><span style="font-weight:700">版权声明：</span>本博客所有文章除特别声明外，均采用<a target="_blank" rel="noopener" href="https://creativecommons.org/licenses/by-nc-sa/4.0/deed.zh">CC BY-NC-SA 4.0 协议</a>。转载请注明出处！</p></div></div><div class="post-meta post-show-meta"><div style="display:flex;align-items:center"><a class="post-meta-link" href="/tags/sp%E6%BA%90%E7%A0%81/" rel="tag"><code>#sp源码</code></a></div></div></article><div class="nav"><div class="nav-item-prev"><a href="/posts/12816.html" class="nav-link"><i class="iconfont icon-left nav-prev-icon"></i><div><div class="nav-label">上一篇</div><div class="nav-title">Open GApps各版本差异</div></div></a></div><div class="nav-item-next"><a href="/posts/52442.html" class="nav-link"><div><div class="nav-label">下一篇</div><div class="nav-title">人物带尾巴幻影特效</div></div><i class="iconfont icon-right nav-next-icon"></i></a></div></div><div class="card card-content comment-card" style="margin-top:16px"><div class="comment-card-title">评论<div id="comment-switch"><span class="first-comment">Waline</span><span class="switch-btn"></span> <span class="second-comment">Gitalk</span></div></div><div id="X_in_1"><div><div id="loading_waline"></div><div id="wcomments"></div><script>loadScript("//unpkg.com/@waline/client@v2/dist/waline.js");var oldLoadVa=window.onload;window.onload=function(){oldLoadVa&&oldLoadVa(),Waline.init({el:"#wcomments",serverURL:"https://waline.qzkyl.ml",path:window.location.pathname,lang:"zh-CN",placeholder:"",meta:["nick","mail","link"],requiredMeta:["nick","mail"],dark:"html[data-user-color-scheme=&#34;dark&#34;]",login:"enable",wordLimit:0,pageSize:10,emoji:["https://gcore.jsdelivr.net/gh/walinejs/emojis/weibo"],locale:{admin:"站长",placeholder:"1. 昵称处输入QQ号将自动获取QQ账户信息\n\n2. 请勿二次点击发送评论，刷新页面即可\n\n3. 评论前请先认真看完文章内容"}})}</script></div><div><div id="gitalk-container"></div><link rel="stylesheet" href="//gcore.jsdelivr.net/npm/gitalk@1/dist/gitalk.css"><script src="//gcore.jsdelivr.net/npm/gitalk@1/dist/gitalk.min.js"></script><script src="/js/lib/md5.min.js"></script><script>var gitalk=new Gitalk({clientID:"055205b012428d0ae41c",clientSecret:"4a9ecd117e8a94c6664fe45c53c7c32257090337",repo:"Hexo_Blog_Issues",owner:"abbw",admin:[],id:md5(window.location.pathname),labels:["Gitalk"],title:document.title,language:"zh-CN",perPage:10,distractionFreeMode:!1});gitalk.render("gitalk-container")</script></div></div></div><div class="card card-content toc-card" id="mobiletoc"><div class="toc-header"><i class="iconfont icon-menu" style="padding-right:2px"></i> 目录</div></div></main><aside class="right-column"><div class="sticky-widescreen"><article class="card card-content history-widget"><div class="history-card"><div class="history-header"><i class="iconfont icon-jintian" style="padding-right:2px"></i> 历史上的今天</div><div id="history-news" style="height:70px;overflow:hidden"><div class="history-list"><span>正在加载中...</span></div><script async src="//gcore.jsdelivr.net/gh/abbw/CDN/js/history.min.js"></script></div></div></article><article class="card card-content toc-card"><div class="toc-header"><i class="iconfont icon-menu" style="padding-right:2px"></i> 目录</div></article><article class="card card-content"><div class="recent-posts-card"><div class="recent-posts-header"><i class="iconfont icon-wenzhang_huaban" style="padding-right:2px"></i> 最近文章</div><div class="recent-posts-list"><div class="recent-posts-item"><div class="recent-posts-item-title">2023-06-05</div><a href="/posts/15016.html"><div class="recent-posts-item-content">Github Actions 触发方式全解析，让你的自动化流程更智能！</div></a></div><div class="recent-posts-item"><div class="recent-posts-item-title">2022-05-30</div><a href="/posts/3462.html"><div class="recent-posts-item-content">如何有效快速更换 Hexo 文章中的 jsdelivr 链接</div></a></div><div class="recent-posts-item"><div class="recent-posts-item-title">2021-04-09</div><a href="/posts/14232.html"><div class="recent-posts-item-content">SS/SSR/V2Ray/Clash 简介和客户端软件下载</div></a></div><div class="recent-posts-item"><div class="recent-posts-item-title">2020-12-27</div><a href="/posts/49159.html"><div class="recent-posts-item-content">安卓快手抖音等自动刷视频辅助</div></a></div></div></div></article></div></aside></div></div></div></div><footer class="footer"><div class="footer-container"><div class="footer-dsc"><div class="github-badge"><span class="badge-subject">Copyright ©</span><span class="badge-value bg-blue">2016 - 2023<a href="/" class="footer-link">骑猪看月亮</a></span></div></div><div class="footer-dsc"><div class="github-badge"><span class="badge-subject">UV</span><span class="badge-value bg-orange" id="leancloud-site-uv"></span></div><div class="github-badge"><span class="badge-subject">PV</span><span class="badge-value bg-yellow" id="leancloud-site-pv"></span></div></div><div class="footer-dsc"><div class="github-badge"><span class="badge-subject">安全运行</span><span class="badge-value bg-green" id="siteTime"></span></div></div><script>function siteTime(){var e=6e4,t=36e5,o=864e5,a=new Date,n="2020",r=a.getFullYear(),i=a.getMonth()+1,l=a.getDate(),M=a.getHours(),g=a.getMinutes(),s=a.getSeconds(),f=Date.UTC(n,"3","14","0","0","0"),h=Date.UTC(r,i,l,M,g,s)-f,T=Math.floor(h/31536e6),m=Math.floor(h/o-365*T),u=Math.floor((h-(365*T+m)*o)/t),D=Math.floor((h-(365*T+m)*o-u*t)/e),c=Math.floor((h-(365*T+m)*o-u*t-D*e)/1e3);document.getElementById("siteTime").innerHTML=n==r?m+" 天 "+u+" 小时 "+D+" 分 "+c+" 秒":T+" 年 "+m+" 天 "+u+" 小时 "+D+" 分 "+c+" 秒"}setInterval(siteTime,1e3)</script></div></footer><a role="button" id="scrollbutton" class="basebutton" aria-label="回到顶部"><i class="iconfont icon-left button-icon"></i></a><a role="button" id="menubutton" aria-label="menu button" class="basebutton"><i class="iconfont icon-menu button-icon"></i></a><a role="button" id="popbutton" class="basebutton" aria-label="控制中心"><i class="iconfont icon-expand button-icon"></i></a><a role="button" id="darkbutton" class="basebutton darkwidget" aria-label="夜色模式"><i class="iconfont icon-yejian button-icon"></i></a><a role="button" id="searchbutton" class="basebutton searchwidget" aria-label="搜索"><i class="iconfont icon-search button-icon"></i></a><script src="https://gcore.jsdelivr.net/npm/jquery@latest/dist/jquery.min.js"></script><link rel="stylesheet" href="//gcore.jsdelivr.net/npm/@fancyapps/fancybox@latest/dist/jquery.fancybox.min.css"><script src="//gcore.jsdelivr.net/npm/@fancyapps/fancybox@latest/dist/jquery.fancybox.min.js"></script><script>const $fancyboxEle=document.querySelectorAll("#section :not(a):not(.gallery) > img, #section > img");$($fancyboxEle).each((function(a,t){const c=$(t),o=c.attr("data-lazy-src")||c.attr("src"),n=c.attr("alt")||"";c.wrap(`<a href="${o}" data-fancybox="group" data-caption="${n}" class="fancybox"></a>`)}))</script><script src="/js/main.js"></script><script>var addLazyload=function(){lozad(".lozad",{load:function(a){a.srcset=a.getAttribute("data-src")},loaded:function(a){a.classList.add("loaded")}}).observe()}</script><script>loadScript("/js/lib/lozad.min.js",addLazyload)</script><script src="//instant.page/5.1.0" type="module" integrity="sha384-by67kQnR+pyfy8yWP4kPO12fHKRLHZPfEsiSXR8u2IKcTdxD805MGUXBzVPnkLHw"></script><script>setTimeout((()=>{localSearch("/search.json")}),0)</script><script async src="//gcore.jsdelivr.net/gh/abbw/CDN/js/abbw.min.js"></script><script async src="/js/leancloud_visitors.js"></script><script>loadScript("//gcore.jsdelivr.net/gh/abbw/CDN/js/clipboard.min.js",addCopy)</script></body></html>